package com.huike.service;

import com.huike.mapper.DoctorMapper;
import com.huike.pojo.Doctor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DoctorService {
    @Autowired
    private DoctorMapper doctorMapper;

    public List<Doctor> findDoctorAll() {return doctorMapper.findDoctorAll();
    }

    public Doctor getDoctorById(Integer id){return doctorMapper.getDoctorById(id);}

    public List<Doctor> findDoctorAllPagination(Integer id, String doctorName, String deptName) {
        return doctorMapper.findDoctorAllPagination(id,doctorName,deptName);
    }

    public Doctor findDoctorById(Integer id) {
        return doctorMapper.findDoctorById(id);
    }

    public void updateForDoctor(Doctor doctor) {
        doctorMapper.updateForDoctor(doctor);
    }

    public void addDoctor(Doctor doctor) {
        doctorMapper.addDoctor(doctor);
    }

    public List<Doctor> findDoctorAllPaginationForExcel(Integer doctorId, String doctorName, String deptName) {
        return doctorMapper.findDoctorAllPaginationForExcel(doctorId,doctorName,deptName);
    }

    public  List<Doctor>getDoctorByDept(Integer department){
        return doctorMapper.getDoctorByDept(department);
    }

}
